<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="../../css/mui.min.css" />
		<script src="../../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<style>
			.main_content p {
				font-size: 1em;
				color: black;
				text-indent: 2em;
				padding: 6px;
			}
			.main_content img {
				padding: 8px;
			}
			.sub_header {
				text-align: center;
				background-color: rgba(0, 188, 0, 0.7);
				height: 36px;
				margin-top: 8px;
				margin-bottom: 8px;
			}
			.sub_header h3 {
				color: white;
				position: relative;
				top: 20%;
				transform: translateY(-50%);
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">Java 基础</h1>
		</header>
		<div class="mui-content">
			<div class="mui-content-padded" style="margin: 5px;">
				<div class="sub_header">
					<h3>数学运算符</h3>
				</div>
				<div class="main_content">
					<h2>算术运算符：</h2>

					<p>算术运算符用于在数学表达式中，他们是在代数中使用的方法相同。下表列出了算术运算符：</p>

					<p>假设整型变量A=10和变量B=20，则：</p>

					<p>算术运算实例</p>

					<table class="src" style="background-color:rgb(247, 247, 247); border-collapse:collapse; border-color:rgb(214, 214, 214); border-spacing:0px; box-sizing:border-box; color:rgb(0, 0, 0); font-family:helvetica,arial,sans-serif; font-size:16px; line-height:22px; margin:8px 0px; max-width:100%; padding:0px; vertical-align:top; width:560px">
						<tbody>
							<tr>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top">运算符</th>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top">描述</th>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top; width:101px">实例</th>
							</tr>
							<tr>
								<td style="vertical-align:top">+</td>
								<td style="vertical-align:top">Addition - Adds values on either side of the operator</td>
								<td style="vertical-align:top">A + B = 30</td>
							</tr>
							<tr>
								<td style="vertical-align:top">-</td>
								<td style="vertical-align:top">Subtraction - Subtracts right hand operand from left hand operand</td>
								<td style="vertical-align:top">A - B = -10</td>
							</tr>
							<tr>
								<td style="vertical-align:top">*</td>
								<td style="vertical-align:top">Multiplication - Multiplies values on either side of the operator</td>
								<td style="vertical-align:top">A * B = 200</td>
							</tr>
							<tr>
								<td style="vertical-align:top">/</td>
								<td style="vertical-align:top">Division - Divides left hand operand by right hand operand</td>
								<td style="vertical-align:top">B / A = 2</td>
							</tr>
							<tr>
								<td style="vertical-align:top">%</td>
								<td style="vertical-align:top">Modulus - Divides left hand operand by right hand operand and returns remainder</td>
								<td style="vertical-align:top">B % A = 0</td>
							</tr>
							<tr>
								<td style="vertical-align:top">++</td>
								<td style="vertical-align:top">Increment - Increases the value of operand by 1</td>
								<td style="vertical-align:top">B++ =21</td>
							</tr>
							<tr>
								<td style="vertical-align:top">--</td>
								<td style="vertical-align:top">Decrement - Decreases the value of operand by 1</td>
								<td style="vertical-align:top">B-- =19</td>
							</tr>
						</tbody>
					</table>

					<h2>关系运算符：</h2>

					<p>有下列由Java语言支持的关系运算符</p>

					<p>假设变量A=10和变量B=20，则：</p>

					<p>关系运算符实例</p>

					<table class="src" style="background-color:rgb(247, 247, 247); border-collapse:collapse; border-color:rgb(214, 214, 214); border-spacing:0px; box-sizing:border-box; color:rgb(0, 0, 0); font-family:helvetica,arial,sans-serif; font-size:16px; line-height:22px; margin:8px 0px; max-width:100%; padding:0px; vertical-align:top; width:560px">
						<tbody>
							<tr>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top">运算符</th>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top">描述</th>
								<th style="background-color:rgb(238, 238, 238); vertical-align:top; width:101px">实例</th>
							</tr>
							<tr>
								<td style="vertical-align:top">==</td>
								<td style="vertical-align:top">Checks if the values of two operands are equal or not, if yes then condition becomes true.</td>
								<td style="vertical-align:top">(A == B) is not true.</td>
							</tr>
							<tr>
								<td style="vertical-align:top">!=</td>
								<td style="vertical-align:top">Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.</td>
								<td style="vertical-align:top">(A != B) is true.</td>
							</tr>
							<tr>
								<td style="vertical-align:top">&gt;</td>
								<td style="vertical-align:top">Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.</td>
								<td style="vertical-align:top">(A &gt; B) is not true.</td>
							</tr>
							<tr>
								<td style="vertical-align:top">&lt;</td>
								<td style="vertical-align:top">Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.</td>
								<td style="vertical-align:top">(A &lt; B) is true.</td>
							</tr>
							<tr>
								<td style="vertical-align:top">&gt;=</td>
								<td style="vertical-align:top">Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.</td>
								<td style="vertical-align:top">(A &gt;= B) is not true.</td>
							</tr>
							<tr>
								<td style="vertical-align:top">&lt;=</td>
								<td style="vertical-align:top">Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.</td>
								<td style="vertical-align:top">(A &lt;= B) is true.
									<br /> &nbsp;
								</td>
							</tr>
						</tbody>
					</table>

				</div>
			</div>
		</div>

	</body>

</html>